//
//  NetWorkingTools.swift
//  微博
//
//  Created by 段瑞金 on 16/5/15.
//  Copyright © 2016年 段瑞金. All rights reserved.
//

import UIKit
import AFNetworking

class NetWorkingTools: AFHTTPSessionManager {
    static let shareInstance : NetWorkingTools = {
        /// 单例
        // 注意点: baseURL一定要以/结尾
        let baseUrl = NSURL(string: "https://api.weibo.com/")
        
        let instance = NetWorkingTools(baseURL: baseUrl, sessionConfiguration: NSURLSessionConfiguration.defaultSessionConfiguration())
        
        instance.responseSerializer.acceptableContentTypes = NSSet(objects: "application/json", "text/json", "text/javascript", "text/plain") as? Set<String>
        
        return instance
        
    }()

}
